package com.keepers.repair.helper;

import android.content.Context;
import android.content.Intent;

import com.keepers.repair.activity.AccountSettingActivity;
import com.keepers.repair.activity.ContactsActivity;
import com.keepers.repair.activity.EditActivity;
import com.keepers.repair.activity.LoginActivity;
import com.keepers.repair.activity.MainNewActivity;
import com.keepers.repair.activity.MaintenanceActivity;
import com.keepers.repair.activity.MyMaintenanceActivity;
import com.keepers.repair.activity.NetSettingActivity;
import com.keepers.repair.activity.PasswordSettingActivity;
import com.keepers.repair.activity.ReportActivity;
import com.keepers.repair.activity.SendActivity;
import com.keepers.repair.activity.SettingsActivity;
import com.keepers.repair.activity.TaskListActivity;

/**
 * auth aboom
 * date 2018/10/22
 */
public class IntentHelper {

    /**
     * 跳转登录页面
     */
    public static void goLogin(Context context) {
        Intent intent = new Intent(context, LoginActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转到主界面
     */
    public static void goMain(Context context) {
        Intent intent = new Intent(context, MainNewActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转到设置
     */
    public static void goSetting(Context context) {
        Intent intent = new Intent(context, SettingsActivity.class);
        context.startActivity(intent);
    }

    /**
     * 联系人
     */
    public static void goContacts(Context context) {
        Intent intent = new Intent(context, ContactsActivity.class);
        context.startActivity(intent);
    }

    /**
     * 账号信息
     */
    public static void goAccountSetting(Context context) {
        Intent intent = new Intent(context, AccountSettingActivity.class);
        context.startActivity(intent);
    }

    /**
     * 修改密码
     */
    public static void goPasswordSetting(Context context) {
        Intent intent = new Intent(context, PasswordSettingActivity.class);
        context.startActivity(intent);
    }

    /**
     * 指定用户任务信息（0今天 -1明天）
     */
    public static void goTaskList(Context context, int type) {
        Intent intent = new Intent(context, TaskListActivity.class);
        intent.putExtra(ConsValue.INTENT_KEY, type);
        context.startActivity(intent);
    }

    /**
     * 报表管理
     */
    public static void goReport(Context context) {
        Intent intent = new Intent(context, ReportActivity.class);
        context.startActivity(intent);
    }

    /**
     * 检修任务
     */
    public static void goMaintenance(Context context) {
        Intent intent = new Intent(context, MaintenanceActivity.class);
        context.startActivity(intent);
    }

    /**
     * 文字输入
     */
    public static Intent goEdit(Context context) {
        return new Intent(context, EditActivity.class);
    }

    /**
     * 我的任务
     */
    public static void goMyMaintenance(Context context) {
        Intent intent = new Intent(context, MyMaintenanceActivity.class);
        context.startActivity(intent);
    }

    /**
     * 汇报进度
     */
    public static void goSend(Context context, String gid) {
        Intent intent = new Intent(context, SendActivity.class);
        intent.putExtra(ConsValue.INTENT_KEY, gid);
        context.startActivity(intent);
    }

    /**
     * 网络设置
     */
    public static void goNetSetting(Context context) {
        Intent i = new Intent(context, NetSettingActivity.class);
        context.startActivity(i);
    }
}
